package com.traffic.fuwu.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.traffic.fuwu.dao.AppVersionMapper;
import com.traffic.fuwu.mybatis.pojo.AppVersion;
import com.traffic.fuwu.service.AppVersionService;
@Service
public class AppVersionServiceImpl implements AppVersionService{
    @Autowired
    private AppVersionMapper appVersionMapper;
	@Override
	public List<Map> selectVersionFy(String version,String appKey, int startRow, int pageSize) {
		List<Map> sd  = new ArrayList<>();
		try{
		sd= appVersionMapper.selectVersionFy(version,appKey,startRow, pageSize);
		}catch(Exception e){
		e.printStackTrace();
		}
		return sd;
	}

	@Override
	public void addVersion(AppVersion version) {
		appVersionMapper.insert(version);
	}

	@Override
	public int newconntVersion(String version,String appKey) {
		return appVersionMapper.countVersion(version,appKey);
	}

}
